<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var radius = parseFloat(prompt('请输入圆锥的底面半径', '3'));
    var height = parseFloat(prompt('请输入圆锥的高', '9'));

    var volume = 1 / 3 * (Math.PI * radius * radius * height);
    alert(volume);

    // 84.82300164692441

  </script>
</body>

</html>